package com.lix.base;

import lombok.Data;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import java.io.Serializable;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.function.Function;

@Data
public class BaseRequest implements Serializable {

    // 页码
    private Integer pageNum = 1;

    // 每页条数
    private Integer pageSize = 10;

    /**
     * activiti分页
     * @return
     */
    public Integer getFirstResult() {
        return (pageNum - 1) * pageSize;
    }
}
